PIXI.Sprite.prototype.changeStates = function (state) {
    if (this.textures.states[state]) {
        this.stop();

        this.textures.splice(
            0,
            this.textures.length,
            ...this.textures.states[state]
        );
        this.State = state;
        this.updateTexture();
        this.gotoAndStop(0);
        return this;
    }
};
